using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;

namespace Imagination.Partitioning
{
	/// <summary>
	/// Zone represents an area of space. This is the foundation for spatial partitioning.
	/// Although the Zone class represents an area, derived classes are responsible for actually
	/// implementing a shape for the Zone.
    /// A Zone contains Things but it does not define how these are stored.
    /// </summary>
	public abstract class Zone : IContainThings
	{

        //  to notify the Zone when a Thing inside it has changed position
        public abstract void ThingMoved(Thing thing);
        /// <summary>
        /// To determine if the specified Thing fits inside this Zone.
        /// Note that this does not report whether a Thing is actually stored in a Zone,
        /// but if its physical dimensions would fit inside.
        /// </summary>
        /// <param name="thing">the thing to check for containment</param>
        /// <returns>ContainmentType status for Thing</returns>
        public abstract ContainmentType Contains(Thing thing);
        
        protected Zone()
        {
        }


        #region IContainThings Members

        public abstract void AddThing(Thing thing);
        public abstract void RemoveThing(Thing thing);
        public abstract void ClearThings();
        public abstract IEnumerable<Thing> EnumerateThings();

        #endregion
    }
}
